﻿#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    ui->pushButton->setStyleSheet("color:red;border:none;");
    QPixmap p1;
    bool ret=p1.load(":/2.jpg");
    if(ret)
    {
    ui->label->setScaledContents(true);
    ui->label->setPixmap(p1);
//    ui->label->setWindowOpacity(0);
//    ui->label->setLayout();
    setWindowFlag(Qt::FramelessWindowHint);
    setAttribute(Qt::WA_TranslucentBackground);
    }
    else
    {
        qDebug("图片加载失败");
    }

}

MainWindow::~MainWindow()
{
    delete ui;
}

